﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:smf="clr-namespace:Microsoft.SilverlightMediaFramework.Core;assembly=Microsoft.SilverlightMediaFramework.Core.Phone"
	 xmlns:smf_converters="clr-namespace:Microsoft.SilverlightMediaFramework.Utilities.Converters;assembly=Microsoft.SilverlightMediaFramework.Utilities.Phone" 
	 xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:smf_accesscontrols="clr-namespace:Microsoft.SilverlightMediaFramework.Core.Accessibility.Controls;assembly=Microsoft.SilverlightMediaFramework.Core.Phone" xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP7" xmlns:VSM="clr-namespace:JustinAngel.Neurons.Framework" xmlns:System_Windows_Controls="clr-namespace:System.Windows.Controls" x:Class="JustinAngel.Neurons.Pages.VideoPlayer.VideoPlayerPage"
    SupportedOrientations="Landscape" Orientation="Landscape"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="800"
    VSM:VSM.StateName="{Binding CurrentStateName}"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
	
		
		<Style x:Key="ReplayButtonStyle" TargetType="Button">
			<Setter Property="Background" Value="#FF1F3B53"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="/Microsoft.SilverlightMediaFramework.Core.Phone;component/Images/replay_normal.png" Margin="12">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates1">
										<VisualState x:Name="Normal1"/>
										<VisualState x:Name="MouseOver1"/>
										<VisualState x:Name="Pressed1"/>
										<VisualState x:Name="Disabled1"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
							</Image>
							<Image x:Name="image1" Source="/Microsoft.SilverlightMediaFramework.Core.Phone;component/Images/replay_pressed.png" Margin="12" Visibility="Collapsed">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates2">
										<VisualState x:Name="Normal2"/>
										<VisualState x:Name="MouseOver2"/>
										<VisualState x:Name="Pressed2"/>
										<VisualState x:Name="Disabled2"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
							</Image>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ThumbStyle" TargetType="Thumb">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Thumb">
						<Rectangle x:Name="rectangle" Fill="White" Margin="0,15">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed"/>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
						</Rectangle>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="TimelineStyle1" TargetType="smf:Timeline">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="smf:Timeline">
						<Grid x:Name="MainLayout">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.25"/>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainLayout"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.25"/>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="LiveStates">
									<VisualState x:Name="Live">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HorizontalAvailableBar">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Vod">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HorizontalAvailableBar">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="ScrubbingStates">
									<VisualState x:Name="IsScrubbing">
										<Storyboard>
											<DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="HorizontalThumb" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="IsNotScrubbing"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Grid x:Name="HorizontalTemplate" Background="Transparent" Height="37" IsHitTestVisible="True" Margin="1,0" VerticalAlignment="Center">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" BorderBrush="{x:Null}" Grid.Column="2" Foreground="{x:Null}" IsHitTestVisible="False" Margin="0,0,1,0">
									<RepeatButton.Template>
										<ControlTemplate>
											<Rectangle Fill="#FF333333" Margin="0,15" StrokeThickness="0.5"/>
										</ControlTemplate>
									</RepeatButton.Template>
								</RepeatButton>
								<Border x:Name="HorizontalAvailableBar" BorderThickness="0" Background="White" Grid.ColumnSpan="3" HorizontalAlignment="Left" Height="12" Margin="0" Opacity="0" Padding="0"/>
								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" BorderBrush="{x:Null}" Grid.Column="0" Foreground="{x:Null}" IsHitTestVisible="False" IsTabStop="False" Margin="1,0,0,0">
									<RepeatButton.Template>
										<ControlTemplate>
											<Rectangle Fill="#FFF09609" Margin="0,15" StrokeThickness="0.5"/>
										</ControlTemplate>
									</RepeatButton.Template>
								</RepeatButton>
								<smf:MarkerItemsControl Grid.ColumnSpan="3" Grid.Column="0" EndPosition="{TemplateBinding EndPosition}" IsLive="{TemplateBinding IsLive}" ItemsSource="{TemplateBinding Markers}" LivePosition="{TemplateBinding LivePosition}" RenderTransformOrigin="0.5,0.5" StartPosition="{TemplateBinding StartPosition}" ThumbWidth="{Binding Width, ElementName=HorizontalThumb}"/>
								<Thumb x:Name="HorizontalThumb" Background="#00FFFFFF" Grid.Column="1" Height="Auto" RenderTransformOrigin="0.5,0.5" Style="{StaticResource ThumbStyle}" Width="30">
									<Thumb.RenderTransform>
										<CompositeTransform/>
									</Thumb.RenderTransform>
								</Thumb>
								<Border BorderBrush="White" BorderThickness="1" Grid.ColumnSpan="3" CornerRadius="2" Margin="0,14"/>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	
    
    

    

		<ControlTemplate x:Key="SMFPlayerControlTemplate1" TargetType="smf:SMFPlayer">
			<Grid>
				<Grid.Resources>
					<smf_converters:TimeSpanValueConverter x:Key="TimeSpanValueConverter"/>
				</Grid.Resources>
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="PlayStates">
						<VisualState x:Name="AcquiringLicense"/>
						<VisualState x:Name="Buffering"/>
						<VisualState x:Name="ClipPlaying">
							<Storyboard>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="ReplayElement">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<System:Boolean>False</System:Boolean>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="PlayElement">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<System:Boolean>False</System:Boolean>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="TimelineElement">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<System:Boolean>False</System:Boolean>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="TimelineElement">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<System:Boolean>False</System:Boolean>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Closed"/>
						<VisualState x:Name="Individualizing"/>
						<VisualState x:Name="Opening"/>
						<VisualState x:Name="Paused"/>
						<VisualState x:Name="Playing"/>
						<VisualState x:Name="Stopped"/>
					</VisualStateGroup>
				
					<VisualStateGroup x:Name="PosterStates">
						<VisualState x:Name="PosterHidden">
							<Storyboard>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Poster">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<Visibility>Collapsed</Visibility>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="PosterVisible">
							<Storyboard>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Poster">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<Visibility>Visible</Visibility>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
				
					
					<VisualStateGroup x:Name="ControlStripStates">
						<VisualStateGroup.Transitions>
							<VisualTransition GeneratedDuration="0:0:0.5" To="ControlStripNotVisible">
								<Storyboard>
									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ControllerContainer">
										<DiscreteObjectKeyFrame KeyTime="0:0:0.6">
											<DiscreteObjectKeyFrame.Value>
												<Visibility>Collapsed</Visibility>
											</DiscreteObjectKeyFrame.Value>
										</DiscreteObjectKeyFrame>
									</ObjectAnimationUsingKeyFrames>
								</Storyboard>
							</VisualTransition>
							<VisualTransition GeneratedDuration="0:0:0.5" To="ControlStripVisible"/>
						</VisualStateGroup.Transitions>
						<VisualState x:Name="ControlStripVisible">
							<Storyboard>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControllerContainer">
									<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
									<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
								</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="ControlStripNotVisible">
							<Storyboard>
								<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControllerContainer" d:IsOptimized="True"/>
								<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ControllerContainer">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<Visibility>Collapsed</Visibility>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
				<Grid x:Name="PlayerRoot" Height="{TemplateBinding Height}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}" Margin="0">


						<ContentControl IsHitTestVisible="True" Height="{TemplateBinding VideoHeight}" Width="{TemplateBinding VideoWidth}" x:Name="MediaPresenterElement" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
					

					
					<Image x:Name="Poster" 
						Height="{TemplateBinding VideoHeight}" 
						Width="{TemplateBinding VideoWidth}"
						DataContext="{TemplateBinding CurrentPlaylistItem}" 
						Source="{Binding ThumbSource}" IsHitTestVisible="False" Visibility="Collapsed"/>
					<Button x:Name="ControlStripToggleElement" Content="Button" BorderBrush="{x:Null}" Foreground="{x:Null}" Opacity="0"/>

					<Grid x:Name="ControllerContainer" VerticalAlignment="Bottom" Background="#7F000000">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
                    		
						<TextBlock x:Name="title" TextWrapping="Wrap" VerticalAlignment="Center" Margin="18,5,0,0" Foreground="White" FontFamily="Segoe UI Semibold" FontSize="26.667" Text="{Binding CurrentPlaylistItem.Title, RelativeSource={RelativeSource TemplatedParent}}"/>
						<StackPanel x:Name="playercontrols" HorizontalAlignment="Center" Margin="0" Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center">
							<Button x:Name="ReplayElement" Style="{StaticResource ReplayButtonStyle}" BorderThickness="0" Width="72" Height="72" Margin="20,0,0,0"/>
							<smf:PlayElement PlayState="{TemplateBinding PlayState}" x:Name="PlayElement" Margin="20,0,0,0" Width="72" Cursor="Hand" Height="72" />
						</StackPanel>
						<Grid x:Name="timelinecontrols" Margin="16,15,16,40" Grid.Row="2">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto"/>
								<ColumnDefinition/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions> <!-- , Converter={StaticResource TimeSpanValueConverter} -->
		 							<TextBlock x:Name="CurrentDurationElement" Text="{Binding EndPosition, Converter={StaticResource TimeSpanValueConverter} , RelativeSource={RelativeSource TemplatedParent}}" FontSize="13.333" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Padding="0,0,8,0" Opacity="0.4" Margin="9,0,0,0" Grid.Row="1" FontFamily="Segoe UI Semibold" Width="60" Height="17.7339324951172"/>
									<TextBlock x:Name="CurrentPositionElement" Text="{Binding PlaybackPosition, Converter={StaticResource TimeSpanValueConverter} , RelativeSource={RelativeSource TemplatedParent}}" FontSize="13.333" Foreground="White" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Padding="8,0,0,0" Margin="0,0,9,0" FontFamily="Segoe UI Semibold" Width="60"/>
										<smf:Timeline x:Name="TimelineElement"
                                            Grid.Column="1"
											TimelineMarkers="{TemplateBinding TimelineMarkers}"
											Chapters="{TemplateBinding Chapters}"
											StartPosition="{TemplateBinding StartPosition}"
											EndPosition="{TemplateBinding EndPosition}"
											IsLive="{TemplateBinding IsMediaLive}"
											LivePosition="{TemplateBinding LivePosition}"
											
											Margin="0" VerticalAlignment="Center" Foreground="{x:Null}" HorizontalContentAlignment="Stretch" Cursor="Hand" Style="{StaticResource TimelineStyle1}" RenderTransformOrigin="0.5,0.5" >
											<smf:Timeline.RenderTransform>
												<CompositeTransform ScaleY="2"/>
											</smf:Timeline.RenderTransform>
										</smf:Timeline>
						
						
						</Grid>
					</Grid>
				</Grid>
			</Grid>
		</ControlTemplate>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<SolidColorBrush Color="{StaticResource PhoneForegroundColor}"/>
	</phone:PhoneApplicationPage.Foreground>
	<phone:PhoneApplicationPage.DataContext>
		<Binding Path="VideoPlayerViewModel" Source="{StaticResource ViewModelLocator}"/>
	</phone:PhoneApplicationPage.DataContext>

	<Grid x:Name="LayoutRoot" Background="Black">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="LoadingStates">
				<VisualState x:Name="IsLoading">
					<Storyboard>
						<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="progressBar" d:IsOptimized="True"/>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="progressBar">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ProgressBar.IsIndeterminate)" Storyboard.TargetName="progressBar">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="NotIsLoading">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="progressBar">
							<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="progressBar">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
							<DiscreteObjectKeyFrame KeyTime="0:0:0.7">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ProgressBar.IsIndeterminate)" Storyboard.TargetName="progressBar">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
							<DiscreteObjectKeyFrame KeyTime="0:0:0.7">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="loadingText">
							<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>


		<Image Margin="0,-31,-4,-37" Source="/MedlindaGates.jpg" Stretch="Fill" Visibility="Collapsed"/>


        <smf:SMFPlayer x:Name="smfPlayer" Playlist="{Binding Playlist}" CaptionsVisibility="Disabled" ChaptersVisibility="Disabled" PlaylistVisibility="Disabled" VolumeLevel="1" IsControlStripVisible="{Binding IsLoading}" Background="{StaticResource PhoneBackgroundBrush}" Template="{StaticResource SMFPlayerControlTemplate1}"  >
			<Custom:Interaction.Triggers>
				<Custom:EventTrigger EventName="PlayStateChanged">
					<GalaSoft_MvvmLight_Command:EventToCommand PassEventArgsToCommand="True" Command="{Binding PlayStateChangedCommand, Mode=OneWay}"/>
				</Custom:EventTrigger>
			</Custom:Interaction.Triggers>
		</smf:SMFPlayer>
		<ProgressBar x:Name="progressBar" Style="{StaticResource PerformanceProgressBar}" VerticalAlignment="Center" Height="10" Visibility="Collapsed" Opacity="0" Margin="0,-100,0,0"/>
		<TextBlock x:Name="loadingText" Margin="0,143,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Loading..." VerticalAlignment="Top" d:LayoutOverrides="Width" HorizontalAlignment="Center" Foreground="White"/>
	</Grid>

</phone:PhoneApplicationPage>
